package com.example.springboot.service;

import com.example.springboot.entity.students;
import com.example.springboot.mapper.SignupFormMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class SignupFormService {

    @Autowired
    private SignupFormMapper SignupFormMapper;

    public List<students> findAllstudents() {
        return SignupFormMapper.findAll();
    }
    public void savestudents(students students) {
        SignupFormMapper.save(students);
    }

    public boolean checkStudentId(int student_id) {
        return SignupFormMapper.existsById(student_id);
    }
}